package com.sxyjhh.fg_data_push.utils.util.wsUtil;


import org.apache.tomcat.util.codec.binary.Base64;

public class Base64Util {
	 
	 public static String byte2Base64(byte[] b){  
		 if(b == null){
			 return null;
		 }
		 String encode = Base64.encodeBase64String(b);
	     return encode;
	  } 
	 
	//base64字符串转byte[]  
    public static byte[] base64String2ByteFun(String base64Str){
    	byte[] photo = Base64.decodeBase64(base64Str);
        return photo;
    } 
	
}
